package com.example.secondhandsysapi.Controller;

import com.example.secondhandsysapi.Entity.OrderDetailInfo;
import com.example.secondhandsysapi.Service.OrderDetailInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("orderdetail")
public class OrderDetailInfoController {
@Autowired
OrderDetailInfoService orderDetailInfoService;

@GetMapping("info")
public List<OrderDetailInfo> queryOrderDetailInfo(@RequestParam Integer order_id){
   return orderDetailInfoService.getOrderDetailInfo(order_id);
}

@GetMapping("After_service")
   public Integer queryAfterService(@RequestParam String After_service,@RequestParam Integer order_id){
   Integer i = orderDetailInfoService.updateAfterDetailInfo(After_service,order_id);
   return 1;
}
}
